package com.sunk.services;

import org.springframework.cglib.proxy.MethodInterceptor;
import org.springframework.cglib.proxy.MethodProxy;

import java.lang.reflect.Method;

public class MyMethodInterceptor implements MethodInterceptor {
	@Override
	public Object intercept(Object o, Method method, Object[] objects, MethodProxy methodProxy) throws Throwable {
		if(objects.length>0){
			objects[0]=1;
		}
		Object invoke = methodProxy.invokeSuper(o, objects);
		return invoke;
	}
}
